<!--
  @Description:首页22:32
  @author Wangshu
  @date 2019/8/17
-->

<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="__PUBLIC__/css/common/bootstrap.min.css">
    <link rel="stylesheet" href="__PUBLIC__/css/home.css">
    <link rel="stylesheet" href="__PUBLIC__/css/header.css">
    <link rel="stylesheet" href="__PUBLIC__/css/common/common.css">
    <link rel="stylesheet" href="__PUBLIC__/css/common/swiper.min.css">
    <title>山东科技大学技术转移公共服务平台-首页</title>
</head>
<body>
<head>
    <div class="top-title">
        <div>
            <span>欢迎登陆山东科技大学技术转移公共服务平台！</span>
            <if condition="$uid eq null">
                <div class="login">
                    <img src="__PUBLIC__/asset/icon/people.png" alt="">
                    <a href="{:url('login/index')}">登录</a>
                    <span class="spece">|</span>
                    <a href="{:url('login/signup')}">注册</a>
                </div>
                <else/>
                <div class="login">
                    <img src="__PUBLIC__/asset/icon/people.png" alt="">
                    <a href="{:url('me/me')}">欢迎你！</a>
                    <a href="{:url('me/me')}">{$user.real_name|default='新用户'}</a>
                </div>
            </if>
        </div>
    </div>
    <div class="logo-box">
        <div class="logo-wrap">
            <div>
                <img src="__PUBLIC__/asset/fodder/logo.png" alt="">
            </div>
            <div>
                <div class="search">
                    <div class="dropdown">
                        <div class="btn select-default dropdown-toggle" type="button" id="dropdownMenu1"
                             data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                            请选择学院
                            <span><img style="width: 20px;" src="__PUBLIC__/asset/icon/dropdown.png" alt=""></span>
                        </div>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                            <foreach name="allColleges" item="vo">
                                <li><a onclick="shows1($(this).text(),{$vo.id})">{$vo.college_name}</a></li>
                            </foreach>
                        </ul>
                    </div>
                    <div class="search-block">
                        <input type="text" name="keyword" id="keyword">
                    </div>
                    <div class="submit" id="submit">
                        <img src="__PUBLIC__/asset/icon/search.png" alt="">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="nav-box">
        <div class="nav-list">
            <ul>
                <li class="active"><a href="#">首页</a></li>
                <li><a href="{:url('news/index')}">新闻</a></li>
                <li><a href="{:url('people/index')}">人才库</a></li>
                <li><a href="{:url('fruit/index')}">成果库</a></li>
                <if condition="$user_type eq 0">
                    <li><a href="{:url('requirement/index')}">需求库</a></li>
                </if>
                <li><a href="{:url('me/callme')}">联系我们</a></li>
            </ul>
        </div>
    </div>
</head>
<main>

    <div class="swiper-container swiper-container-initialized swiper-container-horizontal">
        <div class="swiper-wrapper" style="transition-duration: 0ms; transform: translate3d(-1425px, 0px, 0px);">
            <foreach name="slide" item="vo">
                <div class="swiper-slide"><img class="swiper-img" src="{$vo.thumb}" alt=""></div>
            </foreach>

        </div>
        <div class="swiper-pagination"></div>
        <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
    </div>
    <!--模块部分-->
    <div class="menu-box">
        <div class="m-block">
            <div class="color1">
                <a href="{:url('people/index')}">
                    <img src="__PUBLIC__/asset/icon/menu1.png" alt="">
                    <span>找人才</span>
                </a>
            </div>
            <div class="color2">
                <a href="{:url('fruit/index')}">
                    <img src="__PUBLIC__/asset/icon/menu2.png" alt="">
                    <span>找成果</span>
                </a>
            </div>
            <if condition="$user_type eq 0">
                <div class="color3">
                    <a href="{:url('requirement/index')}">
                        <img src="__PUBLIC__/asset/icon/menu3.png" alt="">
                        <span>找需求</span>
                    </a>
                </div>
            </if>
            <div class="color4">
                <a href="{:url('requirement/publish')}">
                    <img src="__PUBLIC__/asset/icon/menu4.png" alt="">
                    <span>发布需求</span>
                </a>
            </div>
            <if condition="$user_type eq 0">
                <div class="color5">
                    <a href="{:url('fruit/publish')}">
                        <img src="__PUBLIC__/asset/icon/chengguo.png" alt="">
                        <span>发布成果</span>
                    </a>
                </div>
            </if>
        </div>
    </div>

    <!--文章部分-->
    <div class="content-wrap content-bg">
        <div class='article'>
            <div>
                <div class="art-model">
                    <a href="{:url('news/detail')}?id={$top.id}">
                        <img src="{$top.thumb}" alt="">
                        <div class="desc">

                            <p>{$top.title}</p>
                            <p class="desc-tit">
                                {$top.excerpt}
                            </p>
                        </div>
                    </a>
                </div>
                <div class="art-model art-list">
                    <ul>
                        <li>
                            <div><a href="{:url('news/detail')}?id={$top.id}">{$top.title}</a><span>{$top.create_time|date='y-m-d'}</span>
                            </div>
                        </li>

                        <foreach name="articles" item="vo">
                            <li>
                                <div><a href="{:url('news/detail')}?id={$vo.id}">{$vo.title}</a><span>{$vo.create_time|date='y-m-d'}</span>
                                </div>
                            </li>
                        </foreach>


                    </ul>
                </div>
            </div>

            <div class="art-model push-art">
                <div class="push">
                    <p>
                        <img src="__PUBLIC__/asset/icon/light.png" alt="">
                        <span>新成果发布</span>
                    </p>
                    <ul>
                        <foreach name="fruits" item="vo">
                            <li>
                                <p>{$vo.create_time|date='Y-m-d H:i'}</p>
                                <a href="{:url('fruit/detail')}?id={$vo.id}">{$vo.teacher.real_name}老师发布了<span>《{$vo.title}》</span>，快来看看吧</a>
                            </li>
                        </foreach>
                    </ul>
                </div>
                <if condition="$user_type eq 0">
                    <div style="height:10px ;background: #f8f8f8"></div>
                    <div class="push">
                        <p>
                            <img src="__PUBLIC__/asset/icon/aircraft.png" alt="">
                            <span style="color:#4ADBA3">新需求发布</span>
                        </p>
                        <ul>
                            <foreach name="requirements" item="vo">
                                <li>
                                    <p>{$vo.create_time|date='Y-m-d H:i'}</p>
                                    <a href="{:url('requirement/detail')}?id={$vo.id}">尾号{$vo.teacher.phone|mb_substr=7,11,'utf-8'}发布了需求：{$vo.title}</a>
                                </li>
                            </foreach>

                        </ul>
                    </div>
                </if>
            </div>
        </div>
        <!--人才库 成果库  需求库 -->
        <div class="store">
            <div class="store-box">
                <div class='store-model'>
                    <div>
                        <p class="color1">
                            <img src="__PUBLIC__/asset/icon/store1.png" alt="">
                            <span>人才库</span>
                        </p>
                    </div>
                    <foreach name="colleges" item="vo">
                        <div class="teacher">
                            <p>{$vo.college_name}</p>
                            <ul>
                                <foreach name="vo['teachers']" item="vi">
                                    <li><a href="{:url('people/talentsDetail')}?id={$vi.id}"><span>{$vi.real_name} {$vi.academic.title}</span></a>
                                    </li>
                                </foreach>
                            </ul>
                        </div>
                    </foreach>
                </div>

                <div class='store-model'>
                    <div>
                        <p class="color2">
                            <img src="__PUBLIC__/asset/icon/store2.png" alt="">
                            <span>成果库</span>
                        </p>
                    </div>

                    <foreach name="fruitColleges" item="vo">
                        <div class="teacher">
                            <p>{$vo.college_name}</p>
                            <ul>
                                <foreach name="vo['fruits']" item="vi">
                                    <li><a href="{:url('fruit/detail')}?id={$vi.id}"><span>{$vi.title}</span></a></li>
                                </foreach>
                            </ul>
                        </div>
                    </foreach>
                </div>
                <if condition="$user_type eq 0">
                    <div class='store-model'>
                        <div>
                            <p class="color3">
                                <img src="__PUBLIC__/asset/icon/store3.png" alt="">
                                <span>需求库</span>
                            </p>
                        </div>
                        <foreach name="requirementColleges" item="vo">
                            <div class="teacher">
                                <p>{$vo.college_name}</p>
                                <ul>
                                    <foreach name="vo['requirements']" item="vi">
                                        <li><a href="{:url('requirement/detail')}?id={$vi.id}"><span>{$vi.title}</span></a>
                                        </li>

                                    </foreach>
                                </ul>
                            </div>
                        </foreach>
                    </div>
                </if>
            </div>
        </div>
    </div>
</main>
<footer>
    <div class="foot-line">
        <span>青岛校区地址：山东省青岛市黄岛区前湾港路579号</span>
        <span>邮政编码：266590</span>
        <span>联系电话：0532-80698028\80698027\80678029</span>
        <span>传真：0532-80698029</span>
    </div>
    <div class="foot-line">
        <span>泰安校区地址：山东省泰安市岱宗大街223号</span>
        <span>邮政编码：271019</span>
        <span>联系电话：0538-3076489</span>
        <span>传真：0538-3076489</span>
    </div>
    <div class="last-line">
        Copyright©2019 　山东科技大学 　鲁ICP备09051012号
        <span style="line-height: 26px ; margin-left: 20px;"><img
                style="width: 44px;height: 17px; margin-right: 10px;vertical-align: middle"
                src="__PUBLIC__/asset/fodder/todo_white.png" alt=""><span
                style="vertical-align: middle">投道科技提供技术支持</span></span>
    </div>
    <div></div>
</footer>
<script src="__PUBLIC__/js/public/jquery-1.11.3.min.js"></script>
<script src="__PUBLIC__/js/public/swiper.min.js"></script>
<script src="__PUBLIC__/js/public/bootstrap.min.js"></script>
<script src="__PUBLIC__/js/layer/layer/layer.js"></script>
<script>
    var swiper = new Swiper('.swiper-container', {
        pagination: {
            el: '.swiper-pagination',
            dynamicBullets: true,
            // loop: true,
        },
        autoplay: true,
    });
    $('.dropdown-toggle').dropdown()

    var selectCollege = null;

    function shows1(a, id) {
        selectCollege = {id, college: a};
        $("#dropdownMenu1").text(a);
    }

    $("#submit").on('click', function () {
        var name = $("#keyword").val();
        if (!selectCollege) {
            window.open("{:url('people/index')}?keyword=" + name)
        } else {
            window.open("{:url('people/index')}?college_id=" + selectCollege.id + "&keyword=" + name)
        }
    })
</script>
</body>
</html>
